package com.demo.zhihu.model;



import java.util.Date;

import org.apache.ibatis.type.Alias;

@Alias("Answer")
//写回答的实体类
public class Answer {
	private int id;
	//用户id
	private int user;
	//问题id
	private int question;
	//回答内容
	private String content;
	//评论总数
	private int comments;
	//回答帖子问题的默认值为0
	private int likes;
	@Override
	public String toString() {
		return "Answer [id=" + id + ", user=" + user + ", question=" + question + ", content=" + content + ", comments="
				+ comments + ", likes=" + likes + ", date=" + date + "]";
	}
	private Date date;
	public static final int ME = 0;
	public Answer() {};
	public Answer(int id , int comments) {
		this.id  = id;
		this.comments = comments;
	};
	public Answer(int question,int user,String content) {
		this.question = question;
		this.user = user;
		this.content = content;
	};
	public int getComments() {
		return comments;
	}
	public void setComments(int comments) {
		this.comments = comments;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getUser() {
		return user;
	}
	public void setUser(int user) {
		this.user = user;
	}
	public int getQuestion() {
		return question;
	}
	public void setQuestion(int question) {
		this.question = question;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public int getLikes() {
		return likes;
	}
	public void setLikes(int likes) {
		this.likes = likes;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	
	
}
